/*
 * @Author: leevan
 * @Date: 2022-02-25 14:03:51
 * @LastEditTime: 2022-02-25 14:19:07
 * @LastEditors: leevan
 * @FilePath: /usermanagecenter/src/service/apiSerive.serive/index.js
 */
/*
 * @Author: leevan
 * @Date: 2022-02-25 14:03:51
 * @LastEditTime: 2022-02-25 14:06:44
 * @LastEditors: leevan
 * @FilePath: /usermanagecenter/src/service/apiSerive.serive/index.js
 */
import {
    getModelParamById_path,
    queryAllModelList_path,
    queryModelColumnList_path,
    getListModule_path,
    getApiColumnChild_path,
    getModuleChildList_path,
    getSvcDetail_path,
    getColumnParentRequest_path,
    getColumnParentResponse_path,
    getPacketQuery_path,
} from './path';

import {
    POST , GET , PATCH, DELETE, PUT
} from '@/plugins/axios';

//查询所有模型列表
export const queryAllModelList = data => {
    return GET(queryAllModelList_path(),data,{'content-type':'application/json'})
}
//根据模型ID查询模型字段
export const queryModelColumnList = modelId => {
    return GET(queryModelColumnList_path(modelId))
}
//根据模型ID查询模型字段
export const getModelParamById = (modelId)=> {
    return GET(getModelParamById_path(modelId));
};
//查询所有的API模块列表
export const getListModule = (apiName)=> {
    return GET(getListModule_path() , {apiName : apiName || ''});
};
//API下级字段列表
export const getApiColumnChild = (parentId , svcId)=> {
    return GET(getApiColumnChild_path() , {parentId , svcId});
};
//查询模块的API服务列表
export const getModuleChildList = (apiId)=> {
    return GET(getModuleChildList_path(apiId));
};
//API服务接口明细
export const getSvcDetail = (svcId)=> {
    return GET(getSvcDetail_path(svcId));
};
//API一级请求字段列表
export const getColumnParentRequest = (svcId)=> {
    return GET(getColumnParentRequest_path(svcId));
};
//API一级响应字段列表
export const getColumnParentResponse = (svcId)=> {
    return GET(getColumnParentResponse_path(svcId));
};
//API服务交互数据
export const getPacketQuery = (svcId)=> {
    return GET(getPacketQuery_path(svcId));
};
